/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package commonInfrastructure.accountManagement.managedbean;

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ValueChangeEvent;

/**
 *
 * @author xhx
 */
@ManagedBean
@ViewScoped
public class TestManagedBean implements Serializable{
private String outputMessage;    
private String inputMessage;

    /** Creates a new instance of TestManagedBean */
    public TestManagedBean() {
        outputMessage = null;
        inputMessage = null;
    }
    public void onChange(ValueChangeEvent e){
        if(inputMessage == null){
            setOutputMessage(null);
        }
        
        else{
            setOutputMessage("Hello world");
        }
            
    }

    public String getOutputMessage() {
        return outputMessage;
    }

    public void setOutputMessage(String outputMessage) {
        this.outputMessage = outputMessage;
    }

    public String getInputMessage() {
        return inputMessage;
    }

    public void setInputMessage(String inputMessage) {
        this.inputMessage = inputMessage;
    }
}
